package com.xc.mapper;

import com.xc.pojo.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 部门管理
 */
@Mapper
public interface DeptMapper {
    @Select("select * from dept")
    public List<Dept> selectAll();

    @Select("select * from dept where id = #{id}")
    public abstract Dept selectById(Integer id);

    @Delete("delete from dept where id = #{id}")
    public abstract int deleteById(Integer id);

    @Insert("insert into dept values (null,#{name},#{createTime},#{updateTime})")
    public abstract int insertDept(Dept dept);

    @Update("update dept set name = #{name} where id = #{id}")
    public abstract int updateDept(Dept dept);
}
